package com.cx.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class MyMvcConfig implements WebMvcConfigurer {
 
    /*资源处理器*/
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
       //registry.addResourceHandler("/img/**").addResourceLocations("/WEB-INF/"+"/img/");
       registry.addResourceHandler("/static/**").addResourceLocations("/WEB-INF/"+"/static/");
       registry.addResourceHandler("/img/**").addResourceLocations("file:C://Users//赵辰君//IdeaProjects//Hotel//User//src//main//webapp//WEB-INF//img/");
    }
 
}